package com.mes.workhour.domain;

import java.util.Date;

import com.bstek.dorado.config.definition.Operation;
import com.mes.basicdata.domain.Dept;
import com.mes.basicdata.domain.Device;
import com.mes.basicdata.domain.Employee;
import com.mes.basicdata.domain.TypesData;
import com.mes.common.domain.BasicModel;
import com.mes.task.domain.OperationTask;

/*import com.mes.basicdata.persistence.domain.Dept;
import com.mes.basicdata.persistence.domain.Device;
import com.mes.basicdata.persistence.domain.Employee;
import com.mes.basicdata.persistence.domain.Operation;
import com.mes.basicdata.persistence.domain.TypesData;
import com.mes.common.model.BasicModel;
import com.mes.task.persistence.domain.OperationTask;*/

public class WorkHourDetail extends BasicModel
{
	
	public static final int SOURCETYPE_IMPORT=0;//����ȷ��
	public static final int SOURCETYPE_INPUT=1;//��ʱ����

	public static final int VERYFIYSTATE_DRAFT  =1;//  ����� 
//	public static final int VERYFIYSTATE_UNDEFINED=2; //  δ���
	public static final int VERYFIYSTATE_REFUSE=2; //  ��ͨ��
	public static final int  VERYFIYSTATE_PASS=3;  //  ͨ��
	public static final int  VERYFIYSTATE_Invalid=4;  // ���鷴��������Ϣ����Ϊ��Ч״̬
	
	public static final int VERYFIYREASON_UNDEFINED=0;//��ʱδ��	
	public static final int VERYFIYREASON_UNTYPEIN=1;//��ʱδ¼��
	public static final int VERYFIYREASON_PREERROR=2;//׼����׼	
	public static final int VERYFIYREASON_RUNERROR=3;//������׼
	public static final int VERYFIYREASON_ALLERROR=4;//ȫ����׼

	
	private String uniqueId;
	private String accountUid;

	
	private String employeeId;
	private String deviceUid;
	private String workType;
	private Date   workDate;
	private String shiftId;
	private String taskUid;
	private String assnUid;
	private String partNumber;
	private String drawingId;
	private String batchNum;
	private String operationIdDesc;
	private Double runTime;
	private Double preOpTime;
	private Double completeQty;
	private Double completeWork;
	private Double actualWork;
	private String opType;
	private String creatorUid;
	private Date   createTime;
	private String notes;
	private String sourceType;
	
	private Integer veryfiyState;
	private String veryfiyEmployeeUid;
	private Date veryfiyTime;
	private String veryfiyReason;
	private Double overtimeWork;
	private Double vacationWork;
	private String operationUid;// ��Ӧ������operation��Ψһ��
	private String partName;
	private String versionId;
	private String operationName;
	private String deptUid;
	private String deptName;	
	//��������
	private Employee veryfiyEmployee;
	private Employee employee;
	private Employee creator;
	private TypesData opTypeDesc;;
	private OperationTask operationTask;
	private Device device;
	private WorkHourHeader workHourHeader;
	private Operation operation;
	private Dept dept;
	

	
	public Operation getOperation() {
		return operation;
	}
	public void setOperation(Operation operation) {
		this.operation = operation;
	}
	public String getOperationUid() {
		return operationUid;
	}
	public void setOperationUid(String operationUid) {
		this.operationUid = operationUid;
	}
	public String getUniqueId() {
		return uniqueId;
	}
	public void setUniqueId(String uniqueId) {
		this.uniqueId = uniqueId;
	}
	public String getAccountUid() {
		return accountUid;
	}
	public void setAccountUid(String accountUid) {
		this.accountUid = accountUid;
	}
	public String getEmployeeId() {
		return employeeId;
	}
	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

	public String getDeviceUid() {
		return deviceUid;
	}
	public void setDeviceUid(String deviceUid) {
		this.deviceUid = deviceUid;
	}
	public String getWorkType() {
		return workType;
	}
	public void setWorkType(String workType) {
		this.workType = workType;
	}
	public Date getWorkDate() {
		return workDate;
	}
	public void setWorkDate(Date workDate) {
		this.workDate = workDate;
	}
	public String getShiftId() {
		return shiftId;
	}
	public void setShiftId(String shiftId) {
		this.shiftId = shiftId;
	}
	public String getTaskUid() {
		return taskUid;
	}
	public void setTaskUid(String taskUid) {
		this.taskUid = taskUid;
	}

	public String getAssnUid() {
		return assnUid;
	}
	public void setAssnUid(String assnUid) {
		this.assnUid = assnUid;
	}
	public String getPartNumber() {
		return partNumber;
	}
	public void setPartNumber(String partNumber) {
		this.partNumber = partNumber;
	}
	public String getDrawingId() {
		return drawingId;
	}
	public void setDrawingId(String drawingId) {
		this.drawingId = drawingId;
	}
	public String getBatchNum() {
		return batchNum;
	}
	public void setBatchNum(String batchNum) {
		this.batchNum = batchNum;
	}
	public String getOperationIdDesc() {
		return operationIdDesc;
	}
	public void setOperationIdDesc(String operationIdDesc) {
		this.operationIdDesc = operationIdDesc;
	}
	public Double getRunTime() {
		return runTime;
	}
	public void setRunTime(Double runTime) {
		this.runTime = runTime;
	}
	public Double getPreOpTime() {
		return preOpTime;
	}
	public void setPreOpTime(Double preOpTime) {
		this.preOpTime = preOpTime;
	}
	public Double getCompleteQty() {
		return completeQty;
	}
	public void setCompleteQty(Double completeQty) {
		this.completeQty = completeQty;
	}
	public Double getCompleteWork() {
		return completeWork;
	}
	public void setCompleteWork(Double completeWork) {
		this.completeWork = completeWork;
	}
	public Double getActualWork() {
		return actualWork;
	}
	public void setActualWork(Double actualWork) {
		this.actualWork = actualWork;
	}

	public String getOpType() {
		return opType;
	}
	public void setOpType(String opType) {
		this.opType = opType;
	}
	public String getCreatorUid() {
		return creatorUid;
	}
	public void setCreatorUid(String creatorUid) {
		this.creatorUid = creatorUid;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getNotes() {
		return notes;
	}
	public void setNotes(String notes) {
		this.notes = notes;
	}
	public String getSourceType() {
		return sourceType;
	}
	public void setSourceType(String sourceType) {
		this.sourceType = sourceType;
	}
	public Integer getVeryfiyState() {
		return veryfiyState;
	}
	public void setVeryfiyState(Integer veryfiyState) {
		this.veryfiyState = veryfiyState;
	}

	public String getVeryfiyEmployeeUid() {
		return veryfiyEmployeeUid;
	}
	public void setVeryfiyEmployeeUid(String veryfiyEmployeeUid) {
		this.veryfiyEmployeeUid = veryfiyEmployeeUid;
	}
	public String getVeryfiyReason() {
		return veryfiyReason;
	}
	public void setVeryfiyReason(String veryfiyReason) {
		this.veryfiyReason = veryfiyReason;
	}
	public Employee getVeryfiyEmployee() {
		return veryfiyEmployee;
	}
	public void setVeryfiyEmployee(Employee veryfiyEmployee) {
		this.veryfiyEmployee = veryfiyEmployee;
	}

	public Date getVeryfiyTime() {
		return veryfiyTime;
	}
	public void setVeryfiyTime(Date veryfiyTime) {
		this.veryfiyTime = veryfiyTime;
	}
	public Double getOvertimeWork() {
		return overtimeWork;
	}
	public void setOvertimeWork(Double overtimeWork) {
		this.overtimeWork = overtimeWork;
	}
	public Double getVacationWork() {
		return vacationWork;
	}
	public void setVacationWork(Double vacationWork) {
		this.vacationWork = vacationWork;
	}
	public Employee getEmployee() {
		return employee;
	}
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	public Employee getCreator() {
		return creator;
	}
	public void setCreator(Employee creator) {
		this.creator = creator;
	}
	public TypesData getOpTypeDesc() {
		return opTypeDesc;
	}
	public void setOpTypeDesc(TypesData opTypeDesc) {
		this.opTypeDesc = opTypeDesc;
	}
	public OperationTask getOperationTask() {
		return operationTask;
	}
	public void setOperationTask(OperationTask operationTask) {
		this.operationTask = operationTask;
	}
	public Device getDevice() {
		return device;
	}
	public void setDevice(Device device) {
		this.device = device;
	}
	public WorkHourHeader getWorkHourHeader() {
		return workHourHeader;
	}
	public void setWorkHourHeader(WorkHourHeader workHourHeader) {
		this.workHourHeader = workHourHeader;
	}

	
	/**
	 * ���㱾������ɹ�ʱ
	 */
	public void calCompleteWork()
	{
		double preOpTime = this.preOpTime == null ? 0
				:this.preOpTime;
		double completeQty = this.completeQty == null ? 0
				: this.completeQty;
		double runTime =this.runTime == null ? 0
				: this.runTime;
		this.completeWork=(preOpTime + completeQty
				* runTime);
	}
	public Dept getDept() {
		return dept;
	}
	public void setDept(Dept dept) {
		this.dept = dept;
	}

	public String getDeptUid() {
		return deptUid;
	}
	public void setDeptUid(String deptUid) {
		this.deptUid = deptUid;
	}
	public String getDeptName() {
		return deptName;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	public String getPartName() {
		return partName;
	}
	public void setPartName(String partName) {
		this.partName = partName;
	}
	public String getVersionId() {
		return versionId;
	}
	public void setVersionId(String versionId) {
		this.versionId = versionId;
	}
	public String getOperationName() {
		return operationName;
	}
	public void setOperationName(String operationName) {
		this.operationName = operationName;
	}

}
